package interfaz_usuario;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.ImageIcon;
import javax.swing.JButton;

import factory.ImagesSingleton;
 





public class ObjectButton {

	private JButton button;
	private int worldObjectReference; //references to the image associated to worldObject
	
	public ObjectButton(int worldReference){
		worldObjectReference= worldReference;
		button= new JButton();
		button.setIcon(new ImageIcon(ImagesSingleton.images[worldReference]));
		button.addActionListener(new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent arg0) {
				//Aca disaparo mi evento enviando mi objectReference
				
			}
		});
	}

	public JButton getButton() {
		return button;
	}

	public void setButton(JButton button) {
		this.button = button;
	}

	public int getWorldObjectReference() {
		return worldObjectReference;
	}

	public void setWorldObjectReference(int worldObjectReference) {
		this.worldObjectReference = worldObjectReference;
	}
	
	
}
